﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using VFramework;

public class Player : MonoBehaviour {


	public List<GameObject> bullets;

	void Start () {
        Entity entity = GetComponent<Entity>();

        EventMgr.getInstance().addEvent(GameEvent.PLAY_FIRE, delegate (EventData data) {
            //float pressTime = (float)data.data;
            BulletManager.createNormalBullet(GameConfig.PLAYER,transform.position,0,true);
            return null;
        });

        entity.onHurt += delegate (object obj) {
            float damage = (float)obj;

            Debug.Log("player damage = " + damage + ", hp =" + entity.getCurrentHP());
        };
        
        
	}



    
	
	// Update is called once per frame
	void Update () {

	}
}
